<template>
  <div id="app">
    <kfm-nav></kfm-nav>
    <router-view/>
  </div>
</template>

<script>
  import kfm_nav from './components/nav';
  import coffeeFooter from './footer';
  export default {
    name: 'App',
    mounted:function(){
      window.addEventListener('resize',this.updateFontSize);
      this.test();
    },
    methods:{
      test:function(){
        /*这个函数用于各种技术测试*/

      },
      updateFontSize:function () {
        const windowWidth = window.innerWidth;
        const iphone6Width = 375;
        const computed = String(((windowWidth/iphone6Width)*62.5).toFixed(1))+'%';
        const html = document.getElementsByTagName('html')[0];
        html.style.fontSize = computed;
      }
    },
    components:{
      'kfm-nav':kfm_nav
    }
  }
</script>
<style>
  html{
    font-size: 62.5%;
    background: #ffffff;
    height: 100vh;
  }
  body{
    margin: 0;
    height: 100%;
  }
  #app{
    height: 100%;
  }
</style>
